Introduction

Name:Nandini Paladugu City:Bangalore ISB Id: 71710092

R code to clean up the whats app data and plot on the map

rm(list = ls())

library("ggmap")
library(gsubfn)
library(dplyr)
library(tidyr)

chath = readLines("C:/Users/Nandini Paladugu/Desktop/Personal/ISB/Term1/DC/R maps/Data1.txt")
loc.line = grep("location:",chath)
df = data.frame(NULL)

for  (l in loc.line){
  text = chath[l]
  
  split = strsplit(text,"https://maps.google.com/\\?q=")
  datestmp = split[[1]][1]
  location = split[[1]][2]
  latitude = strsplit(location,",")[[1]][1]
  longitude = strsplit(location,",")[[1]][2]
  name = gsub(": location: |^\\s+","",strsplit(datestmp,'-')[[1]][2])
  date = strsplit(strsplit(datestmp,'-')[[1]][1],",")[[1]][1]
  time = strsplit(strsplit(datestmp,'-')[[1]][1],",")[[1]][2]
  description = strsplit(chath[l+1],": ")[[1]][2]
  
  dft = data.frame(name,date,time,latitude, longitude,description, stringsAsFactors = F)
  df = rbind(df,dft)
}

df$latitude = as.numeric(df$latitude)
df$longitude = as.numeric(df$longitude)

blrMap <- qmap(location = "Domlur", zoom = 13, color = "bw")
c <- blrMap +
  geom_point(aes(x = longitude, y = latitude, colour = description,size=2),
             data = df)
c + geom_path(data=df, aes(x=longitude, y=latitude), color="black", size=1)

my one week journey reminds me of Trapezoid and triangles

This looks crazy let me explain Day by Day. Lines are better than shapes

Day1 Thursday

Go to office in the morning come back home in the evening have a nice dinner and sleep
Simple Day Most reliable transport in the morning is Metro.

Day2 Friday

Go to office in the morning and on the way back home visited Chumbak, the Bangalore-based lifestyle products shop, got a new coffee mug to add on to my existing collection

About Chumbak - takes everyday objects and turns them into colourful & fun products :)

And back to my sweet home

Day3 Saturday

No office today.Saturday is the day for grocery shopping,Visit Safal in the morning.

After a class of 2hrs and SA quiz,you definetly need a KFC bucket

Day4 Sunday

Relaxation Day only sleep and laundary.Evening Had to take my mum for a dentist appointment 2 hrs at dental clinic :(
Dentist appointment should be followed by a delicious Natural’s ice cream :) and then Back to home

Day5 Monday Blues

To get rid of all the laziness on the Monday morning you need a super coffee hence Glen’s Bakehouse.

Day6 Tuesday

Nothing new just a different place for Lunch Truffles.Only best part of having office in the center of the city nice restaurants around you

Day 7,8,9

Routine working days Hence end of the story